package com.lagou.exception;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;

/**
 * @program: stage_3_module_1
 * @description:
 * @author: zhangxiaoyang
 * @date: 2020-08-19 05:45
 **/
public class ServerErrorHandler extends ChannelOutboundHandlerAdapter {
    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        System.err.println(this.getClass()
                               .getName() + "---" + cause.getMessage());
        ctx.fireExceptionCaught(cause);
    }
}
